<template>
  <transition name="fade">
  <el-table :data="logs" border>
    <el-table-column prop="runtime" label="操作时间" width="200" sortable/>
    <el-table-column prop="operator" label="操作人" width="280">
      <template slot-scope="scope">
        {{scope.row.opUserName + "&lt;" + scope.row.opUserEmail + "&gt;"}}
      </template>
    </el-table-column>
    <el-table-column prop="action" label="操作" width="200" >
      <template slot-scope="scope">
        {{OpAction[scope.row.action + '']}}
      </template>
    </el-table-column>
    <el-table-column prop="remark" label="备注" />
  </el-table>
  </transition>
</template>

<script>
import { OpAction } from '@/constants'

export default {
  name: 'op-log',
  props: {
    logs: {
      type: Array,
      required: true,
      default: []
    }
  },
  data() {
    return {
      OpAction: OpAction
    }
  }
}
</script>
